package top.heue.utils.log.base

abstract class BaseHandler<T> : IBaseHandler<T> {
    override fun canHandle(any: Any?): Boolean = false
    @Suppress("UNCHECKED_CAST")
    override fun execute(any: Any?): String? {
        if (any == null) return "null"
        if (!canHandle(any)) return null
        val p = any as T
        return handle(p)
    }

}